<?php

namespace App\Providers;

use App\Billing\BankPaymentGateway;
use App\Billing\CreditPaymentGateway;
use App\Billing\PaymentGatewayContract;
use Illuminate\Support\Carbon;
use Illuminate\Support\ServiceProvider;
use \Illuminate\Database\Query\Builder;
class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        if ($this->app->isLocal()) {

          //  $this->app->register(TelescopeServiceProvider::class);
        }

//        $this->app->singleton(PaymentGatewayContract::class,function($app){
//            if(request()->has('credit')){
//
//                return new CreditPaymentGateway('usd');
//            }
//            return new BankPaymentGateway('usd');
//        });

    }

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
       // Carbon::setLocale('zh');
    }
}
